<template>
  <div class="form-definition-body">
    <div class="design-container" data-role="root">

    </div>
  </div>
</template>
<script>
import {createProps} from "@/utils";
import {createFormDefinition} from "@/components/form/type";

export default {
  name: 'FormDefinitionDesigner',
  props: {
    formDefinition: createProps(Object, createFormDefinition)
  },
}
</script>
<style>
.form-definition-body {
  height: 100%;
  padding-top: 30px;
  margin-bottom: 100px;
}

.design-container {
  min-height: 500px;
  width: calc(100% - 20px);
  margin: auto auto;
  background: white;
  padding: 5px;
}

.design-container .drag-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 4px;
  height: 32px;
  border: 1px solid rgb(121.3, 187.1, 255);
  color: rgb(121.3, 187.1, 255)
}

.design-container .field-component {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 4px;
  height: 32px;
  border: 1px solid rgb(177.3, 179.4, 183.6);
  color: black;
  user-select: none;
  cursor: pointer;
}


.design-container .editing-field {
  border: 1px solid #409EFF;
}
.design-container .dragging-block {
  border: 1px dashed rgb(121.3, 187.1, 255);
}

.dragging-block * {
  opacity: 0;
}

 .dragging-block-shadow {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  opacity: 0.5;
  border: 1px solid rgba(0, 0, 0, 0.5);
  position: fixed;
  pointer-events: none;

}
 .dragging-block-shadow * {
  background: none;
}
</style>